﻿function RegisterController($scope, LoginFactory, $location) {
    $scope.user = {
        password: "",
        confirmPassword: null
    }

    $scope.register = function () {
        LoginFactory.Register({ username: $scope.user.username, password: $scope.user.password, email: $scope.user.email }).then(function () { $location.path('/'); })
    }
}
RegisterController.$inject = ['$scope', 'LoginFactory', '$location'];